package com.dehui.traders.ui.viewmodle;

import android.content.Context;
import android.os.Bundle;
import android.util.Log;

import com.dehui.traders.bean.StrategyDetailBean;
import com.dehui.traders.ui.activity.StocksDetailActivity;

import me.goldze.mvvmhabit.base.BaseViewModel;
import me.goldze.mvvmhabit.binding.command.BindingCommand;

/**
 * Created by hqq on 18.4.2.
 */

public class StrateDetailItemViewModel extends BaseViewModel{

    public StrategyDetailBean strategyDetailBean;

    public StrateDetailItemViewModel(Context context, StrategyDetailBean strategyDetailBean) {
        super(context);
        this.strategyDetailBean = strategyDetailBean;
    }

    public BindingCommand onClickCommand = new BindingCommand(()->{
        Bundle bundle = new Bundle();
        bundle.putString(StocksDetailActivity.IntentKey_StocksName,strategyDetailBean.getTitle());
        startActivity(StocksDetailActivity.class,bundle);
    });

}
